#ifndef __CPU_H
#define __CPU_H
#include "stdtype.h"
#include "mxsetup.h"

/* totle cpu number */
#ifdef MXSETUP_CPU_NUM
    #define MX_CPU_NUM MXSETUP_CPU_NUM
#else
    #define MX_CPU_NUM 1U
#endif

/**
 * function [ mx_cpu_getid ] implementation
 * @prototype: mx_usize_t mx_cpu_getid (void)
 *      @param: void
 *      @return: current cpu id (convert from affinity)
 * @desc: get the id of current cpu
 * @note: cpu id is the dimensionality reduction result of cpu affinity,
 *        and its value starts from 0 to `MX_CPU_NUM`
 */
mx_usize_t mx_cpu_getid (void);

#endif
